import React,{ Component } from 'react'
import { Modal } from 'antd'
import { delete_node } from '../../../actions/disk'

class DeleteModal extends Component {
  onSumbit = () => {
    const { dispatch } = this.props
    dispatch(delete_node(dispatch,this.props.parent,this.props.stack))
    this.props.ok()
  }

  render(){
    return (
      <Modal
      visible={this.props.visible}
      onOk={this.onSumbit}
      onCancel={this.props.cancel}
      width={400}
      >
      {this.props.count('移除')}
      </Modal>
    )
  }
}

export default DeleteModal
